home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / Concat.3 < prev    next >
Encoding:
Text File  |  1994-12-17  |  1.6 KB  |  52 lines

  1. '\"
  2. '\" Copyright (c) 1989-1993 The Regents of the University of California.
  3. '\" Copyright (c) 1994 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) Concat.3 1.7 94/12/17 16:17:10
  9. '\" 
  10. .so man.macros
  11. .HS Tcl_Concat tclc
  12. .BS
  13. .SH NAME
  14. Tcl_Concat \- concatenate a collection of strings
  15. .SH SYNOPSIS
  16. .nf
  17. \fB#include <tcl.h>\fR
  18. .sp
  19. char *
  20. \fBTcl_Concat\fR(\fIargc, argv\fR)
  21. .SH ARGUMENTS
  22. .AP int argc in
  23. Number of strings.
  24. .AP char *argv[] in
  25. Array of strings to concatenate.  Must have \fIargc\fR entries.
  26. .BE
  27.  
  28. .SH DESCRIPTION
  29. .PP
  30. \fBTcl_Concat\fR is a utility procedure used by several of the
  31. Tcl commands.  Given a collection of strings, it concatenates
  32. them together into a single string, with the original strings
  33. separated by spaces.  This procedure behaves differently than
  34. \fBTcl_Merge\fR, in that the arguments are simply concatenated:
  35. no effort is made to ensure proper list structure.
  36. However, in most common usage the arguments will all be proper
  37. lists themselves;  if this is true, then the result will also have
  38. proper list structure.
  39. .PP
  40. \fBTcl_Concat\fR eliminates leading and trailing white space as it
  41. copies strings from \fBargv\fR to the result.  If an element of
  42. \fBargv\fR consists of nothing but white space, then that string
  43. is ignored entirely.  This white-space removal was added to make
  44. the output of the \fBconcat\fR command cleaner-looking.
  45. .PP
  46. The result string is dynamically allocated
  47. using \fBmalloc()\fR;  the caller must eventually release the space
  48. by calling \fBfree()\fR.
  49.  
  50. .SH KEYWORDS
  51. concatenate, strings
  52.